import Taro, { Component } from '@tarojs/taro'
import { Image, View } from '@tarojs/components'
import './index.scss'
import { toAnyPage } from '@/utils/page_router'

interface IProps {
  list: any
}

/**
 * 田字格广告
 */
export default class Index extends Component<IProps, {}> {
  props: any
  render() {
    const { list=[] } = this.props
    return (<View className='custom-ad-three'>
      {list.map((ad, k) => {
        return (<Image key={k} src={ad.src} mode='widthFix' className='ad-img' onClick={() => toAnyPage(ad.url)}/>)
      })}
    </View>)
  }
}
